package Server.Timp;

import java.util.Timer;
import java.util.TimerTask;
import java.util.*;

public class ToDoTask extends TimerTask{
	private Timer tm;
	private long timpStart;
	private Vector<String> vDate;
	private static int i = 0;
	
	public ToDoTask(Timer tm, long timpStart, Vector<String>vDate){
		this.tm = tm;
		this.timpStart = timpStart;
		this.vDate = vDate;
	}
	
	 /**
	   * Implementeaza metoda abstracta run al clasei TimerTask 
	   */
	public void run(){
		i++;
		System.out.println(i +" ... " + ((System.currentTimeMillis() - timpStart)/1000) + " secunde de la pornire... " + vDate.get(i));
		//tm.cancel();
		
	}

}
